Optimal. Leaf size=63 \[ \frac{a^3 \cos ^3(e+f x)}{3 f}-\frac{4 a^3 \cos (e+f x)}{f}-\frac{3 a^3 \sin (e+f x) \cos (e+f x)}{2 f}+\frac{5 a^3 x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0503981, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.417, Rules used = {2645, 2638, 2635, 8, 2633} \[ \frac{a^3 \cos ^3(e+f x)}{3 f}-\frac{4 a^3 \cos (e+f x)}{f}-\frac{3 a^3 \sin (e+f x) \cos (e+f x)}{2 f}+\frac{5 a^3 x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2645
Rule 2638
Rule 2635
Rule 8
Rule 2633
Rubi steps
\begin{align*} \int (a+a \sin (e+f x))^3 \, dx &=\int \left (a^3+3 a^3 \sin (e+f x)+3 a^3 \sin ^2(e+f x)+a^3 \sin ^3(e+f x)\right ) \, dx\\ &=a^3 x+a^3 \int \sin ^3(e+f x) \, dx+\left (3 a^3\right ) \int \sin (e+f x) \, dx+\left (3 a^3\right ) \int \sin ^2(e+f x) \, dx\\ &=a^3 x-\frac{3 a^3 \cos (e+f x)}{f}-\frac{3 a^3 \cos (e+f x) \sin (e+f x)}{2 f}+\frac{1}{2} \left (3 a^3\right ) \int 1 \, dx-\frac{a^3 \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=\frac{5 a^3 x}{2}-\frac{4 a^3 \cos (e+f x)}{f}+\frac{a^3 \cos ^3(e+f x)}{3 f}-\frac{3 a^3 \cos (e+f x) \sin (e+f x)}{2 f}\\ \end{align*}
Mathematica [A] time = 0.343007, size = 44, normalized size = 0.7 \[ \frac{a^3 (-9 \sin (2 (e+f x))-45 \cos (e+f x)+\cos (3 (e+f x))+30 e+30 f x)}{12 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.029, size = 74, normalized size = 1.2 \begin{align*}{\frac{1}{f} \left ( -{\frac{{a}^{3} \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}}+3\,{a}^{3} \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -3\,{a}^{3}\cos \left ( fx+e \right ) + \left ( fx+e \right ){a}^{3} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.1194, size = 97, normalized size = 1.54 \begin{align*} a^{3} x + \frac{{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3}}{3 \, f} + \frac{3 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3}}{4 \, f} - \frac{3 \, a^{3} \cos \left (f x + e\right )}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.91581, size = 134, normalized size = 2.13 \begin{align*} \frac{2 \, a^{3} \cos \left (f x + e\right )^{3} + 15 \, a^{3} f x - 9 \, a^{3} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 24 \, a^{3} \cos \left (f x + e\right )}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.625299, size = 121, normalized size = 1.92 \begin{align*} \begin{cases} \frac{3 a^{3} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac{3 a^{3} x \cos ^{2}{\left (e + f x \right )}}{2} + a^{3} x - \frac{a^{3} \sin ^{2}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{f} - \frac{3 a^{3} \sin{\left (e + f x \right )} \cos{\left (e + f x \right )}}{2 f} - \frac{2 a^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac{3 a^{3} \cos{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (a \sin{\left (e \right )} + a\right )^{3} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30665, size = 78, normalized size = 1.24 \begin{align*} \frac{5}{2} \, a^{3} x + \frac{a^{3} \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac{15 \, a^{3} \cos \left (f x + e\right )}{4 \, f} - \frac{3 \, a^{3} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]